
<!DOCTYPE html  [
    <!ENTITY nbsp "&#160;">]>
    <ui:composition template="/layout_dashboard.xhtml"
                    xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:p="http://primefaces.org/ui">
        <ui:param name="onload" value="#{loginController.security('dashboarduser')}"/>



        <ui:define name="Menu">
            <p:panel header="#{loginController.account.username}">
                <h:outputText  value="Name: "/>        
                <h:outputText  value="#{loginController.userdata.name}"  />
                <br/>
                <h:outputText  value="Email:"/>        
                <h:outputText  value=" #{loginController.userdata.EMail}"  />
                <br/>
                <br/>
                <div style="text-align: center">
                    <p:commandButton action="#{loginController.logout()}" value="Logout"/>
                </div>
            </p:panel>
        </ui:define>
        <ui:define name="TopBar">
            <ul>
                <li><a href="../home.xhtml">Homepage</a></li>
                <li class="current_page_item"><a href="#">Courses</a></li>
                <li><a href="../dashboard/dashboarduser.xhtml">Dashboard</a></li>
            </ul>
            <h:panelGroup style="display:block; text-align:right">
                <h:outputLink>Find Courses</h:outputLink>
            </h:panelGroup> 
        </ui:define>

        <ui:define name="Content">
            <h:form id="form">  
                <div style="margin-top: 30px">

                    <p:dataGrid var="field" value="#{listefieldController.getListField()}" columns="3"  
                                rows="12" paginator="true"  
                                paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                rowsPerPageTemplate="9,12,15">  

                        <p:panel header="#{field.fieldName}" style="text-align:center">  
                            <h:panelGrid columns="1" style="width:100%">     

                                <h:outputText value="#{field.fieldCreationDate}" />  


                                <h:link outcome="#{listefieldController.redirect()}" value="Courses" >
                                    <f:param name="fieldid" value="#{field.idField}" />
                                </h:link>

                            </h:panelGrid>  
                        </p:panel>  

                    </p:dataGrid>  


                </div>
            </h:form> 

        </ui:define>
    </ui:composition>

